package com.marketingexpert.service.usermgnt;

import java.util.List;

import com.marketingexpert.domain.User;
import com.marketingexpert.exception.MarketingExpertException;

public interface UserService {
	
	public int insert(User user) throws MarketingExpertException;
	
	public void setPermission(String userId, String permission) throws MarketingExpertException;
	
	public User queryUserByUId(String userId) throws MarketingExpertException;
	
	public List<User> queryUserByParentId(String parentUserId) throws MarketingExpertException;
	
	public List<User> queryAllParentUser() throws MarketingExpertException;

	public void deleteUserById(String userId)throws MarketingExpertException;

	public int updateUser(User myDomainUser)throws MarketingExpertException;

	/**
	 * �����û�״̬
	 * @param userId
	 * @param isactive
	 * @throws MarketingExpertException
	 */
	public void expiredUserById(String userId,String isactive) throws MarketingExpertException;
	
	
	/**
	 * ��ҳ��ѯ�û�
	 * @return
	 */
	public List<User> queryAllUser(int cursor, int pageSize, String userType) throws MarketingExpertException;

	/**
	 * ���username,password�����û��ǲ��ǹ���Ա(���Ƚ�username=userId, password=accessToken)
	 * @param userName
	 * @param password
	 * @return
	 */
	public User queryAdmin(String userName);

	/**
	 *获取淘宝用户的总数
	 * @param taobao
	 * @return
	 */
	public int queryUserCount(String taobao);

	/**
	 * ��������ѯ�û�
	 * @param parentUserId
	 * @return
	 */
	public User queryUserById(int parentUserId); 
	
}
